//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.yaukie.base.config;

import com.github.pagehelper.PageHelper;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@Component
public class PageHelperConfig {
    private static final Logger log = LoggerFactory.getLogger(PageHelperConfig.class);

    public PageHelperConfig() {
    }

    @Bean
    public PageHelper pageHelper() {
        log.debug("PageHelper 拦截器配置加载了...");
        PageHelper pageHelper = new PageHelper();
        Properties properties = new Properties();
        properties.setProperty("helperDialect", "mysql");
        properties.setProperty("reasonable", "true");
        properties.setProperty("supportMethodsArguments", "true");
        properties.setProperty("params", "count=countSql");
        pageHelper.setProperties(properties);
        log.debug("PageHelper 拦截器配置加载完毕...");
        return pageHelper;
    }
}
